import request from '@/utils/request'

// 查询功能/特性库列表
export function listCharacter(query) {
  return request({
    url: '/fmea/common/character/list',
    method: 'get',
    params: query
  })
}

// 查询被引用的特性
export function getCharacterCitationList(query) {
  return request({
    url: '/fmea/common/character/characterCitationList',
    method: 'get',
    params: query
  })
}

// 查询功能/特性库详细
export function getCharacter(id) {
  return request({
    url: '/fmea/common/character/' + id,
    method: 'get'
  })
}

// 新增功能/特性库
export function addCharacter(data) {
  return request({
    url: '/fmea/common/character',
    method: 'post',
    data: data
  })
}

// 修改功能/特性库
export function updateCharacter(data) {
  return request({
    url: '/fmea/common/character',
    method: 'put',
    data: data
  })
}

// 删除功能/特性库
export function delCharacter(id) {
  return request({
    url: '/fmea/common/character/' + id,
    method: 'delete'
  })
}

// 导出功能/特性库
export function exportCharacter(query) {
  return request({
    url: '/fmea/common/character/export',
    method: 'get',
    params: query
  })
}

// 修改版本状态
export function modifyVStatus(query) {
  return request({
    url: '/fmea/common/character/updateVersionStatus',
    method: 'get',
    params: query
  })
}
// 校验特性库
export function exactCharacterKnow(query) {
  return request({
    url: '/fmea/common/character/exactQuery',
    method: 'get',
    params: query
  })
}

